//
//  AuthenicateImageView.m
//  QRMaster
//
//  Created by myApple on 16/4/13.
//  Copyright © 2016年 myApple. All rights reserved.
//

#import "AuthenicateImageView.h"
#import "AutoLayoutFrame.h"

@interface AuthenicateImageView()
{
    UIImageView * authenCredentialImageView;
}

@end

@implementation AuthenicateImageView

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
        [self prepareView];
    }
    return self;
}

-(void)prepareView
{
    float x = 16;
    float y = [AutoLayoutFrame autoSizeY:30.0];
    float width = 100;
    float height = 16;
    UILabel * credentialLabel = [[UILabel alloc]initWithFrame:CGRectMake(x, y, width, height)];
    credentialLabel.text = @"证件图片";
    credentialLabel.textColor = UIColorFromRGBAndA(0x333333, 0.6);
    credentialLabel.font = [UIFont systemFontOfSize:16.0];
    [self addSubview:credentialLabel];
    
    y += height + [AutoLayoutFrame autoSizeY:30.0];
    width = 72;
    height = 72;
    authenCredentialImageView = [[UIImageView alloc]initWithFrame:CGRectMake(x, y, width, height)];
    authenCredentialImageView.userInteractionEnabled = YES;
    UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(showLargeImage)];
    [authenCredentialImageView addGestureRecognizer:tap];
    [self addSubview:authenCredentialImageView];
    
    
    y += height + [AutoLayoutFrame autoSizeY:30.0];
    width = 100;
    height = 16;
    UILabel * credentialNoLabel = [[UILabel alloc]initWithFrame:CGRectMake(x, y, width, height)];
    credentialNoLabel.text = @"证件号码";
    credentialNoLabel.textColor = UIColorFromRGBAndA(0x333333, 0.6);
    [self addSubview:credentialNoLabel];
}


-(void)showLargeImage
{
    
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
